home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / File.Type.Notes / FTN.D5.0007 < prev    next >
Encoding:
Text File  |  1990-03-03  |  7.7 KB  |  164 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. File Type:         $D5 (213)
  7. Auxiliary Type:    $0007
  8.  
  9. Full Name:     SoundSmith Music Sequence
  10. Short Name:    SoundSmith document
  11.  
  12. Written by:    Matt Deatherage                                     March 1990
  13.  
  14. Files of this type and auxiliary type contain music sequences used by 
  15. SoundSmith.
  16. _____________________________________________________________________________
  17.  
  18. SoundSmith is a music sequencing program that uses the full sound capabilities 
  19. of the Apple IIGS.  SoundSmith uses standard Apple Sampled Instrument format 
  20. (ASIF) instruments to produce rich stereo sound with a variety of instruments.
  21.  
  22. For more information on SoundSmith, contact:
  23.  
  24.     Huibert Aalbers
  25.     Travesía Andrés Mellado, 3
  26.     28015 Madrid
  27.     Spain
  28.     Attn:  SoundSmith Technical Support
  29.     Phone:  (34)-1-5446940
  30.  
  31.  
  32. The File Format
  33.  
  34. SoundSmith sequences consist of a 600 byte header, followed by three equally-
  35. sized blocks containing the notes in the sequence, the effects to be applied 
  36. to the notes, and parameters for the effects.  The file concludes with 30 
  37. bytes of stereo information.
  38.  
  39. The Header
  40.  
  41. signature      (+000)    6 Bytes      ASCII bytes "SONGOK".  An identifier 
  42.                                       to SoundSmith that the file is not 
  43.                                       corrupted.
  44. length         (+006)    Word         The length of each of the three 
  45.                                       equally-sized blocks that follow the 
  46.                                       header (Main, Effects1, and Effects2).
  47. tempo          (+008)    Word         The tempo for the song.  A note is 
  48.                                       played each tempo/50th of a second 
  49.                                       (see the "Playing the Music" section 
  50.                                       in this Note).
  51. instBlock1     (+020)    InstBlock    The instrument parameters for the first 
  52.                                       instrument.
  53. instBlock2     (+050)    InstBlock    The instrument parameters for the second 
  54.                                       instrument.
  55. instBlock3     (+080)    InstBlock    The instrument parameters for the third 
  56.                                       instrument.
  57. instBlock4     (+110)    InstBlock    The instrument parameters for the fourth 
  58.                                       instrument.
  59. instBlock5     (+140)    InstBlock    The instrument parameters for the fifth 
  60.                                       instrument.
  61. instBlock6     (+170)    InstBlock    The instrument parameters for the sixth 
  62.                                       instrument.
  63. instBlock7     (+200)    InstBlock    The instrument parameters for the 
  64.                                       seventh instrument.
  65. instBlock8     (+230)    InstBlock    The instrument parameters for the 
  66.                                       eighth instrument.
  67. instBlock9     (+260)    InstBlock    The instrument parameters for the ninth 
  68.                                       instrument.
  69. instBlock10    (+290)    InstBlock    The instrument parameters for the tenth 
  70.                                       instrument.
  71. instBlock11    (+320)    InstBlock    The instrument parameters for the 
  72.                                       eleventh instrument.
  73. instBlock12    (+350)    InstBlock    The instrument parameters for the 
  74.                                       twelfth instrument.
  75. instBlock13    (+380)    InstBlock    The instrument parameters for the 
  76.                                       thirteenth instrument.
  77. instBlock14    (+410)    InstBlock    The instrument parameters for the 
  78.                                       fourteenth instrument.
  79. instBlock15    (+440)    InstBlock    The instrument parameters for the 
  80.                                       fifteenth instrument.
  81. musLength      (+470)    Word         Length of the music in SSBlocks.
  82. musList        (+472)    128 Bytes    List of SSBlocks to play.  Each block 
  83.                                       is identified by one byte 
  84.                                       (i.e., 0 3 5 2 2 n means play block 0, 
  85.                                       block 3 block 5, block 2, block 2, 
  86.                                       and block n respectively).
  87.  
  88. An SSBlock is 896 Bytes (64 * 14 bytes).  The Main block is 
  89. composed if SSBlocks.  An InstBlock is a 30-byte block of 
  90. instrument parameters defined as follows:
  91.  
  92. instName       (+000)    String       ASCII name of the instrument to be 
  93.                                       used.  If this is less than 22 bytes 
  94.                                       (21 characters plus the length byte), 
  95.                                       it must be padded to take 22 bytes.
  96. reserved       (+022)    Word         Reserved, set to zero.
  97. volume         (+024)    Word         Volume for this instrument.  Although 
  98.                                       this is a word parameter, legal values 
  99.                                       range from 0 to 255.
  100. reserved       (+026)    Word         Reserved, set to zero.
  101. reserved       (+028)    Word         Reserved, set to zero.
  102.  
  103.  
  104. The Main block
  105.  
  106. The main part of the file consists of three equally-sized blocks.  The length 
  107. of each of the three parts is given by the Length field in the header; the 
  108. entire Main block is 3*Length bytes long.  Bytes in each block are related to 
  109. each other positionally.  For example, the first byte of the Effects1 and 
  110. Effects2 blocks contain the effects to be applied to the note in the first 
  111. byte of the Notes block.
  112.  
  113. The first block is the Notes block.  Each byte is a MIDI Note number 
  114. representing the note to play.
  115.  
  116. The second block is the Effects1 block.  The high nibble of each byte 
  117. determines which instrument should be used to play the note in the 
  118. corresponding byte of the Notes block.  The low nibble of each byte contains a 
  119. value to be used by each effect.
  120.  
  121. The third block is the Effects2 block, and contains values to be used for the 
  122. effects listed in the bytes of the Effects1 block.
  123.  
  124. Table 1 contains currently defined values for the effects and their values.  
  125. All values not listed are reserved and must not be used.
  126.  
  127.  
  128. Effects1 byte        Effects2 byte
  129. _____________________________________________________________________________
  130. 0 = Arpegiatto       0 = no arpegiatto, $xy = increment1 of x, increment2 of y
  131. 3 = Set Volume       new volume ($00 - $FF)
  132. 5 = Decrease Volume  volume to subtract from instrument volume
  133. 6 = Increase Volume  volume to add to instrument volume
  134. F = Set Tempo        new tempo
  135. _____________________________________________________________________________
  136.  
  137.                        Table 1-SoundSmith Effects
  138.  
  139.  
  140. Stereo Data
  141.  
  142. The file ends with 30 bytes of stereo data.  The data is in 15 words, one for 
  143. each instrument.  A value of $0000 indicates the instrument uses the right 
  144. channel; a value of $FFFF indicates the left channel.  The first word 
  145. corresponds to the first instrument, and so on.
  146.  
  147.  
  148. Playing the Music
  149.  
  150. Those wishing to play the music in a SoundSmith file should use an interrupt-
  151. driven playback routine.  The routine should be called every tempo/50th of a 
  152. second.  When called, the routine should read the next fourteen notes, 
  153. Effects1 and Effects2 bytes, and play them on voices 1 through 14 using the 
  154. specified instruments.  Since SoundSmith provides 14 voices, you can use the 
  155. fifteenth DOC oscillator as a timer to generate the required 50 Hz interrupts.  
  156. When the note value is zero, you should do nothing (do not stop the sample).  
  157. When the note value is 128 ($80), stop the sample on that voice.
  158.  
  159.  
  160. Further Reference
  161. _____________________________________________________________________________
  162.   o  Apple IIGS Toolbox Reference, Volume 3
  163.  
  164.